﻿#ifndef IMAGEGRAY_H
#define IMAGEGRAY_H
#include <QImage>

class ImageToGray
{
public:
    ImageToGray();
    bool apply(QImage &image);

    bool redChannel(QImage &image);
    bool blueChannel(QImage &image);
    bool greenChannel(QImage &image);

private:
    void ARGB32toGray(QImage &image);
    void RGB32toGray(QImage &image);
    void RGB888ToGray(QImage &image);
};

class ImageFlip
{
public:
    enum FlipMode{ NONE = 0, HORIZONTAL_FLIP = 1, VERTICAL_FLIP = 2, BOTH = 3};
    ImageFlip(int flipmode){ m_flipMode = flipmode;}
    bool apply(QImage &image);

private:
    void RGB32Flip(QImage &image);
    void RGB888Flip(QImage &image);

    int m_flipMode = 0;

};

#endif // IMAGEGRAY_H
